<?php
/*========================================= JooSam =========================================/
/																							/
/	Extention:		JooSam																	/
/	Created by:		ScriptPlanet.eu															/
/	Site:			http://www.scriptplanet.eu												/
/	Email:			support@scriptplanet.eu													/
/	Support:		http://www.scriptplanet.eu/support										/
/	Copyright:		2011 (c) ScriptPlanet.eu												/
/	License:		CC BY-NC-ND 3.0 ~ http://creativecommons.org/licenses/by-nc-nd/3.0/		/
/	File Version:	0001																	/
/																							/
/========================================== JooSam ========================================*/
// Joomla Security
defined('_JEXEC') or die;
JHtml::_('behavior.tooltip');
$data = $this->history;
$samerr = $this->samerr;
?>

<div class="jsam_mod_history"> <?php
	if($samerr == ''):
		foreach($data as $c => $song): ?>
			<table border="0" class="jsam_table_bg<?php echo $c % 2; ?>">
				<tr class="jsam_row">
					<th colspan="2" class="jsam_th_date">
						<?php echo $song["date_played"]; ?>
					</th>
				</tr>
				<tr class="jsam_row">
					<td class="jsam_td_artist">
						<?php echo JText::_('COM_JOOSAM_ARTIST'); ?>:
					</td>
					<td class="jsam_td_artist_data">
						<?php echo utf8_encode($song["artist"]); ?>
					</td>
				</tr>
				<tr class="jsam_row">
					<td class="jsam_td_title">
						<?php echo JText::_('COM_JOOSAM_TITLE'); ?>:
					</td>
					<td class="jsam_td_title_data">
						<?php echo utf8_encode($song["title"]); ?>
					</td>
				</tr>
			</table>
		<?php endforeach;
	else: ?>
		<div style="background:white; color:red; font-weight:bold; border-radius:10px; margin:1px; text-align:center; padding:0;">
			<?php echo $samerr; ?>
		</div> <?php
	endif; ?>
</div>